'use client'
import { useAppContext } from '@/components/AppContext'
import Button from '@/components/common/Button'
import { LuPanelLeft } from 'react-icons/lu'
import { ActionType } from '@/reducers/AppReducer'
export default function Menu() {
  const {
    state: { dispalyNavigation }
  } = useAppContext()
  console.log('Navigation render')
  const { dispatch } = useAppContext()
  return (
    <Button icon={LuPanelLeft} className={`${dispalyNavigation ? 'hidden' : ''} fixed left left-2 top-2` }
      onClick={() => {
        dispatch({ type: ActionType.UPDATE, fieId: 'dispalyNavigation', value: !dispalyNavigation })
      }}
    />
  )
}